package com.team.cloudsharing.dao.actionlog;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.team.cloudsharing.dao.user.UserDO;

@Entity
@Table(name = "action_log")
public class ActionLogDO implements Serializable{

	private static final long serialVersionUID = 1L;
	@Id
	@Column(name = "action_id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long actionId;

	@Column(name = "mac_address", nullable = false)
	private String macAddress;
	
	@Column(name = "status", nullable = false)
	private boolean status;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id", nullable = false)
	private UserDO userDO;
	
	public UserDO getUserDO() {
		return userDO;
	}

	public void setUserDO(UserDO userDO) {
		this.userDO = userDO;
	}

	public ActionLogDO() {
	}

	public Long getActionId() {
		return actionId;
	}

	public void setActionId(Long actionId) {
		this.actionId = actionId;
	}

	public String getMacAddress() {
		return macAddress;
	}

	public void setMacAddress(String macAddress) {
		this.macAddress = macAddress;
	}

	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}
	
}
